package com.zhhh.domain;
// Generated 2019-10-11 15:23:22 by Hibernate Tools 3.4.0.CR1

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

import com.fasterxml.jackson.annotation.JsonIgnore;

/**
 * BModeEm generated by hbm2java
 */
@Entity
@Table(name = "b_mode_em")
public class BModeEm implements java.io.Serializable {

	private Integer id;
	private String ctrlCode;
	private String emId;
	private String emText;
	private String textDesc;
	private Integer ifNull;
	private String defaultValue;
	private String dropSelect;
	private String popSelect;
	private String codeNo;
	private String ifRule;
	
	private BModeControl modeControl;
	
	private BRoleModeEm roleModeEm;

	public BModeEm() {
	}

	public BModeEm(String ctrlCode, String emId, String emText) {
		this.ctrlCode = ctrlCode;
		this.emId = emId;
		this.emText = emText;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)

	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "ctrl_code", length = 40)
	public String getCtrlCode() {
		return this.ctrlCode;
	}

	public void setCtrlCode(String ctrlCode) {
		this.ctrlCode = ctrlCode;
	}

	@Column(name = "em_id", length = 40)
	public String getEmId() {
		return this.emId;
	}

	public void setEmId(String emId) {
		this.emId = emId;
	}

	@Column(name = "em_text", length = 40)
	public String getEmText() {
		return this.emText;
	}

	public void setEmText(String emText) {
		this.emText = emText;
	}
	
	
	@Column(name = "text_desc", length = 40)
	public String getTextDesc() {
		return this.textDesc;
	}

	public void setTextDesc(String textDesc) {
		this.textDesc = textDesc;
	}

	@Column(name = "if_null")
	public Integer getIfNull() {
		return this.ifNull;
	}

	public void setIfNull(Integer ifNull) {
		this.ifNull = ifNull;
	}

	@Column(name = "default_value", length = 40)
	public String getDefaultValue() {
		return this.defaultValue;
	}

	public void setDefaultValue(String defaultValue) {
		this.defaultValue = defaultValue;
	}

	@Column(name = "drop_select", length = 40)
	public String getDropSelect() {
		return this.dropSelect;
	}

	public void setDropSelect(String dropSelect) {
		this.dropSelect = dropSelect;
	}

	@Column(name = "pop_select", length = 40)
	public String getPopSelect() {
		return this.popSelect;
	}

	public void setPopSelect(String popSelect) {
		this.popSelect = popSelect;
	}

	@Column(name = "code_no", length = 40)
	public String getCodeNo() {
		return this.codeNo;
	}

	public void setCodeNo(String codeNo) {
		this.codeNo = codeNo;
	}

	@Column(name = "if_rule", length = 500)
	public String getIfRule() {
		return this.ifRule;
	}

	public void setIfRule(String ifRule) {
		this.ifRule = ifRule;
	}

	@ManyToOne
	/**
	 * name  指本表字段名称   referencedColumnName  指关联表字段名称
	 */
	@JoinColumn(name="ctrl_code", referencedColumnName="ctrl_id",insertable=false,updatable=false)
	@org.hibernate.annotations.ForeignKey(name="none")
//	@ManyToOne(fetch = FetchType.LAZY)
//	@JoinColumn(name = "ctrl_code")
	@JsonIgnore
	public BModeControl getModeControl() {
		return modeControl;
	}

	public void setModeControl(BModeControl modeControl) {
		this.modeControl = modeControl;
	}

	/**
	 * @Transient注解： 该属性不需要与数据库映射
	 */
	@Transient
	public BRoleModeEm getRoleModeEm() {
		return roleModeEm;
	}

	public void setRoleModeEm(BRoleModeEm roleModeEm) {
		this.roleModeEm = roleModeEm;
	}

}
